#ifndef TEST_H
#define TEST_H
// Function pointer type definition (supports parameter passing)
typedef int (*CommandHandler)(int argc, char *argv[]);

// Parameter validation function type
typedef int (*Validator)(int argc);

// Command structure
typedef struct {
    const char *name;           // Command name
    CommandHandler handler;     // Handler function
    const char *description;    // Command description
    const char *usage;          // Parameter usage instructions
    Validator validator;        // Parameter validation function (can be NULL)
} Command;

Command* find_command(const char *name);
const char* get_progname(void);
void print_general_help(char *str);
void print_command_help(const char *cmd_name,char *str);
void print_help(int argc, char *argv[]);

#endif